<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/classes/CommonHelper.class.jsp"%>
<%@ include file="/classes/DBHelper.class.jsp"%>
<%

	request.setCharacterEncoding("UTF-8");
	String loginId=(String)(session.getAttribute("loginId")==null?"":session.getAttribute("loginId"));
	if(nullOrEmpty(loginId)){
		out.print("<script>alert(\"请登陆后操作！\");</script>");
		out.print("<script>window.location.href = 'http://htgl.cnsn.gov.cn/cas/login';</script>");
		return;
	}
	
	String hzd = getParameter(request,"hzd");
	String content_hf = getParameter(request,"content_hf");	
	if(nullOrEmpty(hzd) || nullOrEmpty(content_hf)){
		out.print("<script>alert(\"回复内容不能为空！\");history.go(-1);</script>");
		return;
	}
	
	String update_sql = "update APP_SUGGESTION_BOX set content_hf = ? ,hftime = sysdate where hzd = ?";
	int count = executeUpdate(update_sql,new Object[]{content_hf,hzd});
	if(count>0){
		out.print("<script>alert(\"回复成功！\");</script>");
		out.print("<script>window.location.href = 'xxgkyjx_list.jsp?r="+new Date().getTime()+"';</script>");
	}else{
		out.print("<script>alert(\"回复失败！\");history.go(-1);</script>");
	}
%>
